package com.triptogether.utils.db.models;

import java.util.Date;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = Message.TABLE_NAME)
public class Message {

	public static final String TABLE_NAME = "Messages";
	public static final String MESSAGE_ID_COLUMN = "id";
	public static final String CHATTER_USER_COLUMN = "userChatWith";

	@DatabaseField(generatedId = true, columnName = MESSAGE_ID_COLUMN)
	private long id;
	@DatabaseField(foreign = true, columnName = CHATTER_USER_COLUMN)
	private User userChatWith;
	@DatabaseField
	private boolean fromMe;
	@DatabaseField
	private String messageText;
	@DatabaseField
	private Date dateReceived;
	@DatabaseField
	private String currentUserFacebookId;

	public Message() {}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public User getUserChatWith() {
		return userChatWith;
	}

	public void setUserChatWith(User userChatWith) {
		this.userChatWith = userChatWith;
	}

	public boolean isFromMe() {
		return fromMe;
	}

	public void setFromMe(boolean fromMe) {
		this.fromMe = fromMe;
	}

	public String getMessageText() {
		return messageText;
	}

	public void setMessageText(String messageText) {
		this.messageText = messageText;
	}

	public Date getDateReceived() {
		return dateReceived;
	}

	public void setDateReceived(Date dateReceived) {
		this.dateReceived = dateReceived;
	}

	public String getCurrentUserFacebookId() {
		return currentUserFacebookId;
	}

	public void setCurrentUserFacebookId(String currentUserFacebookId) {
		this.currentUserFacebookId = currentUserFacebookId;
	}
}
